<!-- S 优品积分选择 -->
<script type="text/javascript">	
	function selectScord(scoreType){
		$('#pageNo').attr('value','1');
		$('#scoreType').attr('value',scoreType);
		$('#form1').submit();
	}
	
	function pageNext() {
		$('#scoreType').attr('value',${scoreType});
		$('#pageNo').attr('value',${page.pageNum+1});
		$('#form1').submit();
	}
	
	function pagePre() {
		$('#scoreType').attr('value',${scoreType});
		$('#pageNo').attr('value',${page.pageNum-1});
		$('#form1').submit();
	}
	
	function pageSelect() {
		$('#scoreType').attr('value',${scoreType});
		$('#form1').submit();
	}
</script>
<section class="good-product">
	<div class="hd"><h2 class="hd-t">积分选择</h2></div>
	<div class="bd show-area">
		<!-- 积分排序 -->
		<form id="form1" name="form1" action="${basePath}excellent/index.htm#A1" method="post">
			<input type="hidden" name="scoreType" id="scoreType"/>
			<div class="integration-bar ">
				<ul class="control">
					<#if scoreType?exists && scoreType == "1">
						<li class="cur">
					<#else>
						<li>
					</#if><a href="javascript:void(0);" onclick="selectScord('1')" name="A1" id="A1">1-200积分</a></li>
					<#if scoreType?exists && scoreType == "2">
						<li class="cur">
					<#else>
						<li>
					</#if><a href="javascript:void(0);" onclick="selectScord('2')">200-500积分</a></li>
					<#if scoreType?exists && scoreType == "3">
						<li class="cur">
					<#else>
						<li>
					</#if><a href="javascript:void(0);" onclick="selectScord('3')">500-1000积分</a></li>
					<#if scoreType?exists && scoreType == "4">
						<li class="cur">
					<#else>
						<li>
					</#if><a href="javascript:void(0);" onclick="selectScord('4')">1000积分以上</a></li>
	
				</ul>
			</div>
			
			<#if page?exists>
				<#if page.rows?exists>
					<ul class="good-pro-list clearfix">
						<#list page.rows as product>
							<li>
								<a href="${basePath}product/${product.id}.htm" target="_blank" class="img"><img src="${img_server_url + "/" + product.imageUrl1}"  /></a>
								<p class="n"><a href="${basePath}product/${product.id}.htm" target="_blank">${product.name}</a></p>
								<p class="price"><em class="s">
								<span>${product.price?default('0')}</span>积分</em></p>
							</li>
						</#list>
					</ul>
				</#if>
			
				<#if page.totalPage != 0>
					<div class="page-nav">
						<#if page.pageNum==1>
							<span class="start">上一页</span>
						<#else>
							<a href="javascript:pagePre();" class="prev">上一页</a>
						</#if>
						
						<span class="page-info">转到
							<select id="pageNo" name="pageNo" onchange="pageSelect()">
								<#if page.totalPage != 0>
									<#list 1..page.totalPage as p>
										<option <#if p==page.pageNum>selected="selected"</#if> value="${p }">${p }</option>
									</#list>
								</#if>
							</select>
							/${page.totalPage }页
						</span>
						
						<#if page.pageNum == page.totalPage>
							<span class="last">下一页</span>
						<#else>
							<a href="javascript:pageNext();" class="next">下一页</a>
						</#if>
					</div>
				</#if>
			</#if>
		</form>
	</div>
</section>
<!-- E 优品积分选择 -->